public class java20240331 {


    public static int firstchar(String s){
        int[] count = new int[26];
        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            count[ch-'a']++;
        }
        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if(count[ch-'a'] == 1){
                return i;
            }
        }
        return -1;
    }
    public static void main2(String[] args) {
        /*StringBuilder sc = new StringBuilder("abcdef");
        sc.reverse();
        System.out.println(sc);*/

        /*char s = 'a';
        System.out.println((int)s);*/


        String s ="cadcsfd";
        int x =firstchar(s);
        System.out.println(x);
    }


    public static void main(String[] args) {
       /* String sc = "abdeqwerazxx";
        System.out.println(sc.indexOf('z'));
        System.out.println(sc.charAt(3));
        System.out.println(sc.indexOf("ra"));
        System.out.println(sc.lastIndexOf('x'));
        System.out.println(sc.length());
        System.out.println(sc.lastIndexOf('x',11));
        */
        String s1 = String.valueOf(1234);
        String s2 = String.valueOf(1234);
        String s3 = String.valueOf(true);
       // String s4 = String.valueOf(new Student("Hanmeimei",18));
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s3);
    }
}
